package com.lichuang.fruitvarietysm.goods.service.impl;

import com.lichuang.fruitvarietysm.goods.entity.Attribute;
import com.lichuang.fruitvarietysm.goods.entity.GoodsSkuAttr;
import com.lichuang.fruitvarietysm.goods.entity.Goodssku;
import com.lichuang.fruitvarietysm.goods.mapper.GoodsskuMapper;
import com.lichuang.fruitvarietysm.goods.service.IGoodsskuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author shuaihang
 * @since 2019-06-05
 */
@Service
public class GoodsskuServiceImpl extends ServiceImpl<GoodsskuMapper, Goodssku> implements IGoodsskuService {

    @Autowired
    GoodsskuMapper goodsskuMapper;

    @Override
    public int sCountGoodSku(Integer goods_id) {
        return goodsskuMapper.sCountGoodSku(goods_id);
    }

    @Override
    public List<Goodssku> sAttributeValue(Integer goods_id,String attribute_value) {
        return goodsskuMapper.sAttributeValue(goods_id,attribute_value);
    }

    @Override
    public GoodsSkuAttr sAttName(Integer id) {
        return goodsskuMapper.sAttName(id);
    }

    @Override
    public Attribute sAttributeName(Integer attribute_id) {
        return goodsskuMapper.sAttributeName(attribute_id);
    }
}
